<script setup lang="ts">
import { ref, reactive, nextTick } from "vue";

defineOptions({
  name: "AppOfflineClean"
});
const frameSrc = "http://10.8.58.43:48080/";
const test = async () => {
  await nextTick();
  let frame = document.getElementById("frame");
  frame.onload = function (e) {
    console.log(e);

    console.log("iframe 加载成功");
  };

  frame.onerror = function (e) {
    console.log(e);
    console.log("iframe 加载错误");
  };
};
test()
</script>

<template>
  <div class="frame" element-loading-text="加载中...">
    iframe
    <!-- <iframe id="frame" ref="frameRef" :src="frameSrc" class="frame-iframe" /> -->
  </div>
</template>

<style lang="scss" scoped>
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.frame {
  margin-left: -20px;
  margin-top: -20px;
  width: 500px;
  height: 500px;
  background-color: aqua;
  .frame-iframe {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    overflow: hidden !important;
    border: 0;
  }
}

.main-content {
  margin: 2px 0 0 !important;
}
</style>
